-
Notifications
You must be signed in to change notification settings - Fork 932
ompi/comm: Improve MPI_Comm_create algorithm #3375
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
4f530eb to
f1f7f20
Compare
Algorithm efficiency verificationI've applied the following patch to verify that algorithm provides performance improvement: diff --git a/ompi/communicator/comm_cid.c b/ompi/communicator/comm_cid.c
index 6f67d99..35d978f 100644
--- a/ompi/communicator/comm_cid.c
+++ b/ompi/communicator/comm_cid.c
@@ -411,6 +411,15 @@ static int ompi_comm_nextcid_check_flag (ompi_comm_request_t *request)
}
.
if (1 == context->rflag) {
+ {
+ static int comm_count = 0;
+ int rank;
+ MPI_Comm_rank(MPI_COMM_WORLD, &rank);
+ if( 0 == rank ){
+ printf("Comm #%d: CID=%d, iters=%d\n", ++comm_count, context->nextcid, context->iter);
+ }
+ }
+
if( !participate ) {
/* we need to provide something sane here
* but we cannot use `nextcid` as we may have it This debug output demonstrates significant improvement for my comm_create benchmark (https://github.com/artpol84/poc/tree/master/benchmarks/comm_create) that I derived from Amber app :
Overall new algo is about 80 times faster than the old one. |
|
MTT is clean, I started one MTT with enabled reporter to |
|
@hjelmn I also fixed some error handling paths. Could you please double-check me? |
Force only procs that are participating in the ne Comm to decide what
CID is appropriate. This will have 2 advantages:
* Speedup Comm creation for small communicators: non-participating procs
will not interfere
* Reduce CID fragmentation: non-overlaping groups will be allowed to use
same CID.
Signed-off-by: Artem Polyakov <[email protected]>
f1f7f20 to
68167ec
Compare
|
Test Passed |
|
I performed MTTs for each branches internally with mpirun launches. |
|
👍 |
|
@bosilca @ggouaillardet please review |
|
Please fix typo in commit message: I assume "ne" should be "new". |
ggouaillardet
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please refer to my comments in #3388
|
I saw that it was already merged into 3.x and 1.10. |
|
Sigh - I thought after this much time it had already been put in master. In future, please be advised that we don't work this way - it must be put into master before opening PRs on release branches. Otherwise, it leads to this kind of confusion. I won't revert it out of 1.10 - let's see what happens on master and then we'll decide. |
|
I don't mind - All PRs was there and ready to go. I usually don't merge my own PRs. |
|
Ummm...why would you be expecting someone else to merge your PRs to master? I can't think of anyone else who does that, or any reason for it. |
Signed-off-by: Artem Polyakov [email protected]